<!--注册-->
<ion-view ng-controller="ion_signUp" view-title="加入书循">
    <ion-nav-buttons side="right">
        <button class="button button-clear button-balanced" ui-sref="book.recommend">书循</button>
    </ion-nav-buttons>
    <ion-content class="padding">
        <!-- 正在加载-->
        <div style="text-align: center;margin: 5px" ng-if="isLoading">
            <ion-spinner icon="ripple" class="spinner-balanced"></ion-spinner>
        </div>
        <!-- 微信信息-->
        <div class="item item-avatar">
            <img ng-src="{{userInfo.avatarUrl}}">

            <h2>{{userInfo.nickName}}
                <i class="icon ion-male" style="color: #5eb1ed" ng-if="userInfo.sex==1"></i>
                <i class="icon ion-female" style="color: #ff6d9e" ng-if="userInfo.sex==2"></i>
            </h2>
        </div>
        <!-- 填写其他信息-->
        <div class="list list-inset">
            <ion-item class="item-icon-right" ng-click="chooseSchoolModalView.show()">
                我在读的学校
                <span class="item-note" ng-if="userInfo.school" ng-bind="userInfo.school"></span>
                <i class="icon ion-ios-arrow-right balanced"></i>
            </ion-item>
            <ion-item class="item-icon-right" ng-click="chooseMajorModalView.show()">
                我所学的专业
                <span class="item-note" ng-if="userInfo.major" ng-bind="userInfo.major"></span>
                <i class="icon ion-ios-arrow-right balanced"></i>
            </ion-item>
            <label class="item item-input item-select">
                <span class="input-label">
                    大学入学时间
                </span>
                <select ng-model="userInfo.startSchoolYear">
                    <option ng-repeat="one in startSchoolYearOptions" value="{{one}}" ng-bind="one"></option>
                </select>
            </label>
        </div>
        <!-- 提交-->
        <button class="button button-block button-outline button-balanced" ng-click="submitOnClick()"
                ng-disabled="isLoading || !(userInfo.school && userInfo.major && userInfo.startSchoolYear)">
            立即加入
        </button>
    </ion-content>
</ion-view>